Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add DeepThunk #41

Merged
merged 4 commits into from
Aug 22, 2024
Merged

feat: add DeepThunk #41

merged 4 commits into from
Aug 22, 2024

Conversation

Equilibris
Copy link
Collaborator

DeepThunk corresponds to the (co-)trace of a given polynomial functor, here we add the natural transformation required to generate them. These will later be used to inject into when generating syntax for codef syntax.

This commit simply adds the code without using it.

Copy link
Contributor

@AtticusKuhn AtticusKuhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this file involves some pretty dense Category Theory and many abstractions. Due to my limited knowledge of Category Theory, I don't really understand what's going on in this file, but I will cautiously approve this nonetheless.

@alexkeizer
Copy link
Owner

It seems that this file involves some pretty dense Category Theory and many abstractions. Due to my limited knowledge of Category Theory, I don't really understand what's going on in this file, but I will cautiously approve this nonetheless.

Reviewing code you don't understand can be a bit intimidating, but nonetheless having you look over it is very valuable!
Even if you don't understand the categorical nonsense, you can still look for "obvious" mistakes in style and such. It's completely fine to approve a file for style with the caveat that you didn't consider the bigger picture of it all.
So thanks for having a look anyway!

Copy link
Owner

@alexkeizer alexkeizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice construction! I don't quite follow what the docstrings are saying, which probably means they could use some more love.

I like that you wrote a detailed intro, it's a complicated construction so having the context at the start is really nice!

Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
Qpf/Qpf/Multivariate/Constructions/DeepThunk.lean Outdated Show resolved Hide resolved
@Equilibris
Copy link
Collaborator Author

Fixed the comments, feel free to take a look when you have time @alexkeizer

Copy link
Owner

@alexkeizer alexkeizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/-!
# DeepThunk

`DeepThunk` corresponds approximately to the [trace](https://ncatlab.org/nlab/show/traced+monoidal+category) of a given polynomial functor.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if adding a link to ncatlab make the code more approachable (it's good to have references!) or less (people tend to be intimidated by ncat 🤣). Thanks for adding it, though, I guess ncat is the canonical source for categorical nonsense

@alexkeizer alexkeizer enabled auto-merge (rebase) August 22, 2024 14:24
@alexkeizer alexkeizer merged commit 5413c5a into master Aug 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants